package javacafe.action.study;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import javacafe.action.Action;
import javacafe.action.ActionForward;
import javacafe.dto.study.StudyAuthMgrDTO;
import javacafe.service.StudyService;
import javacafe.serviceimple.StudyServiceImpl;

public class AuthMgrFormAction implements Action {

	@Override
	public ActionForward execute(HttpServletRequest request,
			HttpServletResponse response) {
		
		ActionForward forward = new ActionForward();
		forward.setUrl("authmgrform");
		
		int study_no = Integer.parseInt( request.getParameter("study_no") );
		StudyService studyService = StudyServiceImpl.getInstance();
		List<StudyAuthMgrDTO> authList = studyService.getStudyMemberAuthList(study_no);
		request.setAttribute("authList", authList);

		return forward;
	}

}
